package com.qt.myio;

import java.io.*;

/**
 * @Author zsf
 * @Date 2023/9/26 23:06
 * @Version 1.0
 */
public class BufferedStreamDemo01 {

    public static void main(String[] args) throws IOException {

        /**
         * 字符缓冲流
         */

        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("aaa/a.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("aaa/b.txt"));

        int len;
        byte[] bytes = new byte[1024];
        while ((len = bis.read(bytes)) != -1) {
            bos.write(bytes, 0, len);
        }
        bos.close();
        bis.close();


    }

}
